package com.xliang.spider.version04.dao;

import com.xliang.spider.version04.pojo.ChapterEntity;

import java.util.List;

/**
 * ${DESCRIPTION}
 *
 * @author xiongl
 * @create 2016-06-21 16:23
 */
public interface SpiderChapterDao
{
    int insertChapter(ChapterEntity chapter)
        throws Exception;

    int updateChapter(ChapterEntity chapter)
        throws Exception;

    int updateChapterStatusById(ChapterEntity chapter)
        throws Exception;

    /**
     * 查找还未下载完成的章节列表，取10条
     * @return
     * @throws Exception
     */
    List<ChapterEntity> findChapterList()
        throws Exception;

    ChapterEntity findChapterByChapterIdAndLessonName(int chapterId, String lessonName)
        throws Exception;
}
